import 'package:flutter/material.dart';
import '../model/post.dart';

class PostShowDemo extends StatelessWidget {
  final Post post;

  const PostShowDemo({Key key, @required this.post}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
        child: Scaffold(
      appBar: AppBar(
        title: Text('${post.title}'),
      ),
      body: Column(
        // mainAxisAlignment: MainAxisAlignment.center,
        // crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          Image.network('${post.imageUrl}'),
          Text(
            '${post.title}',
            style: TextStyle(color: Colors.black, fontSize: 32),
          ),
          Text('${post.author}',
              style: TextStyle(
                color: Colors.grey,
                fontSize: 24,
              )),
        ],
      ),
    ));
  }
}
